{% extends "default.html" %}
{% load socialsignin %}
{% block title %}Profile{% endblock %}
{% block main_content %}
	<h1>Welcome back {{ user.first_name }}.</h1>

	{% if user.facebook_profiles.count %}
		<p>
			You have {{ user.facebook_profiles.count }} Facebook profile{{ user.facebook_profiles.count|pluralize }} linked with us:<br/>
			{% for profile in user.facebook_profiles.all %}
				<a href="{{ profile.profile_url }}"><img alt="{{ user.first_anme }}" src="{{ profile.profile_picture }}"></a>
			{% endfor %}
		</p>
	{% endif %}

	{% if user.openid_profiles.count %}
		<p>
			You have {{ user.openid_profiles.count }} OpenID profile{{ user.openid_profiles.count|pluralize }} linked with us:<br/>
			{% for profile in user.openid_profiles.all %}
				<a href="{{ profile.identity_url }}">{{ profile.identity_url }}</a><br/>
			{% endfor %}
		</p>
	{% endif %}

	{% if user.liveid_profiles.count %}
		<p>
			You have {{ user.liveid_profiles.count }} Windows Live ID profile{{ user.liveid_profiles.count|pluralize }} linked with us:<br/>
			{% for profile in user.liveid_profiles.all %}
				<a href="{{ profile.profile_url }}"><img alt="{{ user.first_anme }}" src="{{ profile.profile_picture }}"></a>
			{% endfor %}
		</p>
	{% endif %}

	{% if user.twitter_profiles.count %}
		<p>
			You have {{ user.twitter_profiles.count }} Twitter profile{{ user.twitter_profiles.count|pluralize }} linked with us:<br/>
			{% for profile in user.twitter_profiles.all %}
				<a href="{{ profile.profile_url }}"><img alt="{{ user.first_anme }}" src="{{ profile.profile_picture }}"></a>
			{% endfor %}
		</p>
	{% endif %}

	<p>Maybe you want to <a href="{% url django.contrib.auth.views.logout %}">logout</a>?</p>
{% endblock %}
